package com.cloudpivot.receivales.contract.repository.erpcontract;

import com.cloudpivot.receivales.contract.entity.erpcontract.CMList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import org.springframework.transaction.annotation.Transactional;

/**
 * cmlist 数据表操作
 * 插入方法
 */
@Repository
@Transactional(rollbackFor = Exception.class)
public interface CMListRepository extends JpaRepository<CMList,String> {

    @Modifying
    @Query(nativeQuery=true,value = "insert into CM_List (GUID, strContractID, strContractName, strState, dtDate) values (:#{#cmList.guid},:#{#cmList.strContractID},:#{#cmList.strContractName},:#{#cmList.strState},:#{#cmList.dtDate})")
    int addCMList(CMList cmList);

}
